import request from "@/utils/request";

// 分页用户角色查询
export function listPageUserRoles(data) {
  return request({
    url: "/user-role/pages",
    method: "get",
    params: data,
  });
}

// 分页用户查询
export function listPageUsers(data) {
  return request({
    url: "/user-role/user/pages",
    method: "get",
    params: data,
  });
}

// 新增用户角色
export function insertUserRole(data) {
  return request({
    url: "/user-role",
    method: "post",
    data,
  });
}

// 批量新增用户角色
export function insertBatchUserRoles(data) {
  return request({
    url: "/user-role/batches",
    method: "post",
    data,
  });
}

// 编辑用户角色
export function updateUserRole(data) {
  return request({
    url: "/user-role",
    method: "put",
    data,
  });
}

// 批量删除用户角色
export function deleteUserRoles(data) {
  return request({
    url: "/user-role",
    method: "delete",
    params: data,
  });
}

// 删除用户角色
export function deleteUserRole(data) {
  return request({
    url: "/user-role/" + data,
    method: "delete",
  });
}
